package com.eduction.service.impl;

import java.sql.SQLException;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.eduction.modules.system.dao.CourseRecordRepository;
import com.eduction.modules.system.entity.CourseRecord;
import com.eduction.service.CourseRecordServie;
@Service
public class CourseRecordServiceImpl implements CourseRecordServie {
	@Autowired
	private CourseRecordRepository courseRecordRepository;
	@Override
	public void saveCourseRecord(CourseRecord c) {
		this.courseRecordRepository.saveCourseRecord(c);
	}


	@Override
	public CourseRecord queryCourseRecordById(String id,String sid) throws SQLException {
		return this.courseRecordRepository.queryCourseRecordById2(id,sid);
	}

	@Override
	public CourseRecord queryCourseRecordById(String id,String sid,String eid) throws SQLException {
		return this.courseRecordRepository.queryCourseRecordById(id,sid,eid);
	}

	@Override
	public List<CourseRecord> queryCRsByExpert(String expertId) throws SQLException {
		return this.courseRecordRepository.queryCRsByExpert(expertId);
	}

	@Override
	public CourseRecord queryCRsById(String id) throws SQLException {
		return this.courseRecordRepository.queryCRsById(id);
	}

	@Override
	public void deleteCourseRecordMapState(String sign, String schoolId, String expertId)  throws SQLException{
		this.courseRecordRepository.deleteCourseRecordMapState(sign,schoolId,expertId);
	}

}
